﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SimpleRest.Core.Exceptions;

namespace SimpleRest.Core.Extensions.OAuth.Exceptions
{
    public class TemporarilyUnavailableException : WebExceptionBase, IOAuthException
    {
        public string ErrorUri { get; set; }

        public TemporarilyUnavailableException()
            : base("The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server.") { }

        public override System.Net.HttpStatusCode StatusCode
        {
            get { return System.Net.HttpStatusCode.ServiceUnavailable; }
        }

        public override string ErrorCode
        {
            get { return "temporarily_unavailable"; }
        }

        public string OAuthMessage
        {
            get { return "temporarily_unavailable"; }
        }
    }
}
